package org.jugile.proto2.domain;

import org.jugile.daims.Bo;
import org.jugile.daims.anno.*;
import org.jugile.proto2.common.FamilyType;

@DaimsObject(table="family_t")
public class FamilyBase extends Bo {

	@Fld(size=300)
	private String name;
	public String getName() { return name; }
	public Family setName(String v) { return (Family)setFld("name",v); }

	@Connection1N(o="family")
	private PersonCollection cPersons = new PersonCollection();
	public PersonCollection getPersons() { return (PersonCollection)getAll("cPersons"); }
	public void addPerson(Person o) { add("cPersons",o); }
	public void removePerson(Person o) { remove("cPersons",o); } 

	@ConnectionNN(c="nFriendFamilies")
	private PersonCollection nFriendPersons = new PersonCollection();
	public PersonCollection getFriendPersons() { return (PersonCollection)getAll("nFriendPersons"); }
	public void addFriendPerson(Person o) { add("nFriendPersons",o); }
	public void removeFriendPerson(Person o) { remove("nFriendPersons",o); }

	@Fld
	private FamilyType type;
	public FamilyType getType() { return type; }
	public Family setType(FamilyType v) { return (Family)setFld("type",v); }

	@Fld
	private boolean isBig;
	public boolean getIsBig() { return isBig; }
	public Family setIsBig(boolean v) { return (Family)setFld("isBig",v); }
	
}
